import * as types from '../mutation-types';
import { typeOf } from 'common/js/utils';

export default {
  [types.SET_TOP_TYPE](state, topType) {
    state.topType = topType;
  },
  [types.SET_PRODUCT_TREE](state, productTree) {
    state.productTree = productTree;
  },
  // hardware
  [types.SET_CATEGORY1](state, category1) {
    state.category1 = category1;
  },
  [types.SET_CATEGORY2](state, category2) {
    state.category2 = category2;
  },
  [types.SET_PRODUCT_NAME_LIST](state, list) {
    state.productNameList = list;
  },

  // software
  [types.SET_SOFT_CATEGORY1](state, category1) {
    state.softCategory1 = category1;
  },
  [types.SET_SOFT_CATEGORY2](state, category2) {
    state.softCategory2 = category2;
  },
};
